snippet php
	<?php

		${1}

	//End of file 
snippet ph
	<?php ${1} ?>
snippet ec
	echo "${1:string}"${2};
snippet inc
	include('${1:file}');${2}
snippet inc1
	include_once('${1:file}');${2}
snippet req
	require('${1:file}');${2}
snippet req1
	require_once('${1:file}');${2}
# $GLOBALS['...']
snippet globals
	$GLOBALS['${1:variable}']${2: = }${3:something}${4:;}${5}
snippet $_ COOKIE['...']
	$_COOKIE['${1:variable}']${2}
snippet $_ ENV['...']
	$_ENV['${1:variable}']${2}
snippet $_ FILES['...']
	$_FILES['${1:variable}']${2}
snippet $_ Get['...']
	$_GET['${1:variable}']${2}
snippet $_ POST['...']
	$_POST['${1:variable}']${2}
snippet $_ REQUEST['...']
	$_REQUEST['${1:variable}']${2}
snippet $_ SERVER['...']
	$_SERVER['${1:variable}']${2}
snippet $_ SESSION['...']
	$_SESSION['${1:variable}']${2}
# Start Docblock
snippet /*
	/**
	 * ${1}
	 **/
# Class - post doc
snippet doc_cp
	/**
	 * ${1:undocumented class}
	 *
	 * @package ${2:default}
	 * @author ${3:`g:snips_author`}
	**/${4}
# Class Variable - post doc
snippet doc_vp
	/**
	 * ${1:undocumented class variable}
	 *
	 * @var ${2:string}
	 **/${3}
# Class Variable
snippet doc_v
	/**
	 * ${3:undocumented class variable}
	 *
	 * @var ${4:string}
	 **/
	${1:var} $${2};${5}
# Class
snippet doc_c
	/**
	 * ${3:undocumented class}
	 *
	 * @packaged ${4:default}
	 * @author ${5:`g:snips_author`}
	 **/
	${1:}class ${2:} {
		${6}
	} // END $1class $2
# Constant Definition - post doc
snippet doc_dp
	/**
	 * ${1:undocumented constant}
	 **/${2}
# Constant Definition
snippet doc_d
	/**
	 * ${3:undocumented constant}
	 **/
	define(${1}, ${2});${4}
# Function - post doc
snippet doc_fp
	/**
	 * ${1:undocumented function} 
	 *
	 * @return ${2:void}
	 * @author ${3:`g:snips_author`}
	 **/${4}
# Function signature
snippet doc_s
	/**
	 * ${4:undocumented function}
	 *
	 * @return ${5:void}
	 * @author ${6:`g:snips_author`}
	 **/
	${1}function ${2}(${3});${7}
# Function
snippet doc_f
	/**
	 * ${4:undocumented function}
	 *
	 * @return ${5:void}
	 * @author ${6:`g:snips_author`}
	 **/
	${1}function ${2}(${3}) {
		${7}
	}
# Header
snippet doc_h
	/**
	 * ${1}
	 *
	 * @author ${2:`g:snips_author`}
	 * @version ${3:3.0}
	 * @copyright ${4:$2}, `strftime('%d %B, %Y')`
	 * @package ${5:default}
	 **/
	
	/**
	 * Define DocBlock
	 */
# Interface
snippet doc_i
	/**
	 * ${2:undocumented class}
	 *
	 * @package ${3:default}
	 * @author ${4:`g:snips_author`}
	 **/
	interface ${1:}
	{${5}
	} // END interface $1
# class ...
snippet class
	/**
	 * ${1}
	 **/
	class ${2:ClassName} {
		${3}
		function ${4:__construct}(${5:argument}) {
			${6:// code...}
		}
	}
# define(...)
snippet def
	define('${1}'${2});${3}
# defined(...)
snippet def?
	${1}defined('${2}')${3}
snippet wh
	while (${1:/* condition */}) {
		${2:// code...}
	}
# do ... while
snippet do
	do {
		${2:// code... }
	} while (${1:/* condition */});
snippet if
	if (${1:/* condition */}) {
		${2:// code...}
	}
snippet ife
	if (${1:/* condition */}) {
		${2:// code...}
	} else {
		${3:// code...}
	}
	${4}
snippet else
	else {
		${1:// code...}
	}
snippet elseif
	elseif (${1:/* condition */}) {
		${2:// code...}
	}
# Tertiary conditional
snippet t
	$${1:retVal} = (${2:condition}) ? ${3:a} : ${4:b};${5}
snippet switch
	switch ($${1:variable}) {
		case '${2:value}':
			${3:// code...}
			break;
		${5}
		default:
			${4:// code...}
			break;
	}
snippet case
	case '${1:value}':
		${2:// code...}
		break;${3}
snippet for
	for ($${2:i} = 0; $$2 < ${1:count}; $$2${3:++}) {
		${4: // code...}
	}
snippet foreach
	foreach ($${1:variable} as $${2:key}) {
		${3:// code...}
	}
snippet fun
	${1:public }function ${2:FunctionName}(${3})
	{
		${4:// code...}
	}
# $... = array (...)
snippet array
	$${1:arrayName} = array('${2}' => ${3});${4}

snippet arr 
	array(
		'${1}' => ${2}
	)

snippet doc_me
	/**
	*
	*Desc:${1:desc}
	*Email:coderhwz@gmail.com
	*Author:hwz
	*
	**/
snippet doc_file
	/**
	*
	* Desc:${1:desc}
	*
	* Author:hwz
	*
	**/
snippet wp_theme_def
	/**
	Theme Name: {$:Theme Name}
	Author URI: dont have one for the moment 
	Theme URI: 
	Author: hwz 
	Version: 3.0 
	Description: 
	*/



# Some useful Unicode entities
# Non-Breaking Space
snippet nbs
	&nbsp;
# ←
snippet left
	&#x2190;
# →
snippet right
	&#x2192;
# ↑
snippet up
	&#x2191;
# ↓
snippet down
	&#x2193;
# ↩
snippet return
	&#x21A9;
# ⇤
snippet backtab
	&#x21E4;
# ⇥
snippet tab
	&#x21E5;
# ⇧
snippet shift
	&#x21E7;
# ⌃
snippet control
	&#x2303;
# ⌅
snippet enter
	&#x2305;
# ⌘
snippet command
	&#x2318;
# ⌥
snippet option
	&#x2325;
# ⌦
snippet delete
	&#x2326;
# ⌫
snippet backspace
	&#x232B;
# ⎋
snippet escape
	&#x238B;
# Generic Doctype
snippet doctype HTML 4.01 Strict
	<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""
	"http://www.w3.org/TR/html4/strict.dtd">
snippet doctype HTML 4.01 Transitional
	<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""
	"http://www.w3.org/TR/html4/loose.dtd">
snippet doctype HTML 5
	<!DOCTYPE HTML>
snippet doctype XHTML 1.0 Frameset
	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
snippet doctype XHTML 1.0 Strict
	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
snippet doctype XHTML 1.0 Transitional
	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
snippet doctype XHTML 1.1
	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
	"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
# HTML Doctype 4.01 Strict
snippet docts
	<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""
	"http://www.w3.org/TR/html4/strict.dtd">
# HTML Doctype 4.01 Transitional
snippet doct
	<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""
	"http://www.w3.org/TR/html4/loose.dtd">
# HTML Doctype 5
snippet doct5
	<!DOCTYPE HTML>
# XHTML Doctype 1.0 Frameset
snippet docxf
	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
# XHTML Doctype 1.0 Strict
snippet docxs
	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
# XHTML Doctype 1.0 Transitional
snippet docxt
	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
# XHTML Doctype 1.1
snippet docx
	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
	"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
snippet html
	<html>
	${1}
	</html>
snippet xhtml
	<html xmlns="http://www.w3.org/1999/xhtml">
	${1}
	</html>
snippet body
	<body>
		${1}
	</body>
snippet head
	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8"`Close()`>

		<title>${1:`substitute(Filename('', 'Page Title'), '^.', '\u&', '')`}</title>
		${2}
	</head>
snippet title
	<title>${1:`substitute(Filename('', 'Page Title'), '^.', '\u&', '')`}</title>${2}
snippet span 
	<span ${1:class or id }>${2:content}</span>${3}
snippet script
	<script type="text/javascript" charset="utf-8">
		${1}
	</script>${2}
snippet scriptsrc
	<script src="${1}.js" type="text/javascript" charset="utf-8"></script>${2}
snippet style
	<style type="text/css" media="${1:screen}">
		${2}
	</style>${3}
snippet base
	<base href="${1}" target="${2}"`Close()`>
snippet r
	<br`Close()[1:]`>
snippet div
	<div id="${1:name}">
		${2}
	</div>
# Embed QT Movie
snippet movie
	<object width="$2" height="$3" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
	 codebase="http://www.apple.com/qtactivex/qtplugin.cab">
		<param name="src" value="$1"`Close()`>
		<param name="controller" value="$4"`Close()`>
		<param name="autoplay" value="$5"`Close()`>
		<embed src="${1:movie.mov}"
			width="${2:320}" height="${3:240}"
			controller="${4:true}" autoplay="${5:true}"
			scale="tofit" cache="true"
			pluginspage="http://www.apple.com/quicktime/download/"
		`Close()[1:]`>
	</object>${6}
snippet fieldset
	<fieldset id="$1">
		<legend>${1:name}</legend>

		${3}
	</fieldset>
snippet form
	<form action="${1:`Filename('$1_submit')`}" method="${2:get}" accept-charset="utf-8">
		${3}


	<p><input type="submit" value="Continue &rarr;"`Close()`></p>
	</form>
snippet h1
	<h1 id="${1:heading}">${2:$1}</h1>
snippet input
	<input type="${1:text/submit/hidden/button}" name="${2:some_name}" value="${3}"`Close()`>${4}
snippet label
	<label for="${2:$1}">${1:name}</label><input type="${3:text/submit/hidden/button}" name="${4:$2}" value="${5}" id="${6:$2}"`Close()`>${7}
snippet link
	<link rel="${1:stylesheet}" href="${2:/css/master.css}" type="text/css" media="${3:screen}" charset="utf-8"`Close()`>${4}
snippet mailto
	<a href="mailto:${1:joe@example.com}?subject=${2:feedback}">${3:email me}</a>
snippet a
	<a href="${1:#}" class="${2:link}">${3}</a>
snippet meta
	<meta name="${1:name}" content="${2:content}"`Close()`>${3}
snippet opt
	<option value="${1:option}">${2:$1}</option>${3}
snippet p 
	<p>${1}</p>
snippet optt
	<option>${1:option}</option>${2}
snippet select
	<select name="${1:some_name}" id="${2:$1}">
		<option value="${3:option}">${4:$3}</option>
	</select>${5}
snippet table
	<table border="${1:0}">
		<tr><th>${2:Header}</th></tr>
		<tr><th>${3:Data}</th></tr>
	</table>${4}
snippet textarea
	<textarea name="${1:Name}" rows="${2:8}" cols="${3:40}">${4}</textarea>${5}
snippet ul
	<ul>
		<li>${1:content}</li>
	</ul>
snippet sql_insert
	INSERT INTO ${1:tablename} SET ${2:colname} = '${3:colvalue}'; 
snippet sql_update 
	UPDATE ${1:tablename} SET ${2:colname} = '${3:colvalue}' WHERE ${4:key} = '${5:value}'; 
snippet sql_delete
	DELETE FROM ${1:tbl_name} WHERE ${2:key} = '${3:value}';
snippet sql_select
	SELECT ${1:field} FROM ${2:tbl_name} WHERE ${3:key} = '${4:value}' LIMIT ${5:count};
snippet sql_left
	SELECT ${1:field} FROM ${2:tbl_name} LEFT JOIN ${3:tbl_name} ON ${4:field} = ${5:field} WHERE ${6:key} = '${7:value}' LIMIT ${8:count};
snippet sql_right
	SELECT ${1:field} FROM ${2:tbl_name} RIGHT JOIN ${3:tbl_name} ON ${4:field} = ${5:field} WHERE ${6:key} = '${7:value} LIMIT ${8:count}';
snippet loop
	 <?php if (have_posts()) : ?>
		   <?php while (have_posts()) : the_post(); ?>    
		   ${1:// todo}
		   <?php endwhile; ?>
	 <?php endif; ?>
snippet loop_get_posts
	<?php global $post; 
		$args = array(${1:'category' => -9}); // exclude category 9
		$custom_posts = get_posts($args);
		foreach($custom_posts as $post) : setup_postdata($post);?>
		   ${2:// todo}
	<?php endforeach;
	?>
snippet loop_wp_query
	<?php $result = new WP_Query(${1:cat=-9});
		while($result->have_posts()) : $result->the_post(); ?>
		   ${2:// todo}
		<?php endwhile; ?>
	<?php wp_reset_postdata(); ?>
snippet loop_query_posts
	<?php global $query_string;
		query_posts( $query_string.${1:$args} );?>
		 <?php if (have_posts()) : ?>
			   <?php while (have_posts()) : the_post(); ?>    
			   ${2:// todo}
			   <?php endwhile; ?>
		 <?php endif; ?>
	<?php wp_reset_query(); ?>
snippet st 
	<?= ${1:$v} ?>
snippet ci_h
	defined('BASEPATH') OR exit('No direct script access allowed');
snippet ifabs
	if ( !defined('ABSPATH')) exit;
snippet zendcontroller
	namespace ${1:name}\Controller;

	use Zend\Mvc\Controller\AbstractActionController;
	use Zend\View\Model\ViewModel;

	class ${2:nameOfCtl}Controller extends AbstractActionController {
		public function ${3:nameOfAction}Action() {
			return new ViewModel();
		}
	}
snippet cicontroller
	class ${1:nameOfClass} extends CI_Controller {

		/**
		 * ${2:desc} 
		 */
		public function ${3:nameOfAction}()
		{
			$this->load->view('welcome_message');
		}
	}
snippet zf2UnitController

	namespace ${1:namespace};

	use ${2:Test}\Bootstrap;
	use ${3:TestTarget};
	use Zend\Mvc\Router\Http\TreeRouteStack as HttpRouter;
	use Zend\Http\Request;
	use Zend\Http\Response;
	use Zend\Mvc\MvcEvent;
	use Zend\Mvc\Router\RouteMatch;
	use PHPUnit_Framework_TestCase;

	class ${4:TestClassName} extends PHPUnit_Framework_TestCase
	{
		protected $controller;
		protected $request;
		protected $response;
		protected $routeMatch;
		protected $event;

		protected function setUp() {
			$serviceManager = Bootstrap::getServiceManager();
			$this->controller = new ${5:InstanceOfTarget}();
			$this->request    = new Request();
			$this->routeMatch = new RouteMatch(array(${6:'controller' => 'index'}));
			$this->event      = new MvcEvent();
			$config = $serviceManager->get('Config');
			$routerConfig = isset($config['router']) ? $config['router'] : array();
			$router = HttpRouter::factory($routerConfig);

			$this->event->setRouter($router);
			$this->event->setRouteMatch($this->routeMatch);
			$this->controller->setEvent($this->event);
			$this->controller->setServiceLocator($serviceManager);
		}

		public function testIndexAction(){
			$this->routeMatch->setParam('action','index');
			$result = $this->controller->dispatch($this->request);
			$response= $this->controller->getResponse();
			$this->assertEquals(200,$response->getStatusCode());
		}
	}
snippet	3m
	${1} ? ${2} : ${3:NULL}
snippet	3
	${1} ? ${2} : ${3:NULL}
